from flask import flash

def flash_form_error(form):
    for key in form.errors.keys():
        flash(form.errors[key][0])           